package gui;
/**
 *
 * @author Calle
 */
public class ChatSettings extends javax.swing.JPanel {

    private javax.swing.JButton addToChatButton;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel settingsLabel;
    private MainFrame mf;
    
    /**
     * Creates new form chatSettingsGui
     */
    public ChatSettings(MainFrame mf) {
    	this.mf = mf;
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        settingsLabel = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        addToChatButton = new javax.swing.JButton();

        settingsLabel.setFont(new java.awt.Font("Georgia", 0, 24)); // NOI18N
        settingsLabel.setText("Settings - Chat");

        jSeparator1.setForeground(new java.awt.Color(0, 0, 0));

        addToChatButton.setText("Add Friends to Chat");
        addToChatButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addToChatButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(settingsLabel)
                        .addGap(0, 179, Short.MAX_VALUE))
                    .addComponent(jSeparator1)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(addToChatButton)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(settingsLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 291, Short.MAX_VALUE)
                .addComponent(addToChatButton)
                .addContainerGap())
        );
    }

    private void addToChatButtonActionPerformed(java.awt.event.ActionEvent evt) {
       new NewChatMember(mf.getUser());
    }

}

